package com.cn.jinl.domain;

import com.cn.jinl.utils.CommonUtil;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;

import java.util.Date;
import java.util.List;
import java.util.Map;

public class ProductStorage {
    private String id;

    private String storageType;

    private String storageCode;

    private String storageUserId;

    private String storageUserName;

    private Integer storageCount;

    private Integer storageGradeCount;

    private String remark;

    private String storageStatus;

    private String status;

    private Date createTime;

    private Date updateStatus;

    private int count;

    List<ProductStorageRelate> productStorageRelates;
    List<ProductStorageVo> productStorageVos = Lists.newArrayList();

    public static final transient Map<String, String> TYPESTATUSMAP =
            ImmutableMap.of("1", "生产", "2", "整理");

    public static final transient Map<String, String> STATUSMAP =
            ImmutableMap.of("0", "待入库", "1", "已入库");

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getStorageTypeCn() {
        return TYPESTATUSMAP.get(getStorageType());
    }
    public String getStorageType() {
        return storageType;
    }

    public void setStorageType(String storageType) {
        this.storageType = storageType == null ? null : storageType.trim();
    }

    public String getStorageCode() {
        return storageCode;
    }

    public void setStorageCode(String storageCode) {
        this.storageCode = storageCode == null ? null : storageCode.trim();
    }

    public String getStorageUserId() {
        return storageUserId;
    }

    public void setStorageUserId(String storageUserId) {
        this.storageUserId = storageUserId == null ? null : storageUserId.trim();
    }

    public String getStorageUserName() {
        return storageUserName;
    }

    public void setStorageUserName(String storageUserName) {
        this.storageUserName = storageUserName == null ? null : storageUserName.trim();
    }

    public Integer getStorageCount() {
        return storageCount;
    }

    public void setStorageCount(Integer storageCount) {
        this.storageCount = storageCount;
    }

    public Integer getStorageGradeCount() {
        return storageGradeCount;
    }

    public void setStorageGradeCount(Integer storageGradeCount) {
        this.storageGradeCount = storageGradeCount;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark == null ? null : remark.trim();
    }

    public String getStorageStatusCn() {
        return STATUSMAP.get(getStorageStatus());
    }
    public String getStorageStatus() {
        return storageStatus;
    }

    public void setStorageStatus(String storageStatus) {
        this.storageStatus = storageStatus == null ? null : storageStatus.trim();
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateStatus() {
        return updateStatus;
    }

    public void setUpdateStatus(Date updateStatus) {
        this.updateStatus = updateStatus;
    }

    public List<ProductStorageRelate> getProductStorageRelates() {
        return productStorageRelates;
    }

    public void setProductStorageRelates(List<ProductStorageRelate> productStorageRelates) {
        this.productStorageRelates = productStorageRelates;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public List<ProductStorageVo> getProductStorageVos() {
        return productStorageVos;
    }

    public void setProductStorageVos(List<ProductStorageVo> productStorageVos) {
        this.productStorageVos = productStorageVos;
    }

    public String getCreateTimeFt(){
        String formatTime = CommonUtil.getStrTime(getCreateTime(),"yyyy-MM-dd HH:mm:ss");
        return formatTime;
    }
}